Repository navigation
client: a read-only Inbox keeps only Open and says why - #2299
Conversation
In a read-only window every Inbox action was a write the host refuses, and the window said nothing in place about it. The rows and their Open stay; the four writes (answer a question, the task input, Accept, Send back) are not drawn and one sentence at the top of the dialog carries the host's own read-only words. An approval keeps Reject and Allow: approval-answer is one of the reads a read-only channel allows. The gate reuses lockedWindow from schedules.js; a writable window renders the same tree, pinned by a sha256 of the fixture. Fixes ThinkFlowLab#2284
|
@Birfy — review request for this pull request, on one exact tip.
What it does: in a read-only window the Inbox now offers only Open. The four write actions (the answer-question fields, the task input, Accept, Send back) are not rendered, and one host sentence for Independent FlyBot Test advisory on this tip: PASS (7/7 checks).
CI on this tip: 13 success, 1 cancelled (a superseded Please give the formal review decision on exactly tip |
|
Verdict: PASS at 8dbfc9d Review — read-only Inbox keeps only Open (#2284)Ran at this tip: Where the evidence comes from: tip tree from CI at this tip. Live head is Red first, independently. With the base blob of The change. Generated files. Not run: the full For the enqueue step, one thing to know: this head sits on the fork |
Fixes #2284
Written-by: Dev1
Owner: Dev1
Reviewer: Birfy
Claim-Id: fdf1298faa3542aea854e775ae0e4364
Branch: dev/1-inbox-readonly-actions
Base: 5d6193a
Tree: 2a61cce732cbe5876de1f2e06e6b98a9afe081c9
Verified commit: 922a2acb6239f703f8a96675df87f467614dc133
Pushed head: 8dbfc9d
Scope
A read-only window's Inbox drew the whole Needs you action set, and every one of those actions is a write the host refuses with
bot/read-only: answering a question (answer-question), the task input (task-answer-input), Accept (task-accept-result) and Send back (task-send-back). The rows and their Open action stay; the four writes are not drawn, and one sentence at the top of the dialog carries the host's own read-only words (the samebt-read-onlyrole="status"hint the Settings header, the sidebar, the schedule page and the boards draw). An Approval card keeps Reject and Allow:approval-answeris one of the reads a read-only channel allows, so it is not part of this defect. A writable window — including a blank or missingreadOnly— draws exactly the tree it drew before, pinned by a sha256 of the fixture.The gate is
lockedWindowimported fromschedules.js(#2232/#2298); no second copy of the predicate. The card builds its write block with a spread so the writable children list is byte-for-byte the same, and the dialog's hint is added the same way.Changed files (8, +345/−10):
core/src/client/inbox.js(+10/−2) — importlockedWindow;lockedinInboxCardandInboxDialog; the two write components are drawn only when unlocked; one hint line at the top of the dialog bodycore/test/inbox-readonly.test.js(new, +157) — six cases: the three locked cards (result, question, task input), the locked dialog's one hint, the approval reverse, and the writable reverse with the recorded tree hashcore/client.js(+4/−2) — regenerated bynpm run buildpatches/ds-bot/0008-client-bundle.patch(+5/−3),patches/ds-bot/files/src/client/inbox.js(+10/−2),patches/ds-bot/files/test/inbox-readonly.test.js(new, +157) — regenerated bynode scripts/ds-bot-patches.mjs generatedocs/subsystems/core-client.md(+1/−1) — theinbox.jssubsystem rowchangelog.d/2284-inbox-readonly-actions.fixed.md(new, +1)Red first, on the new base
5d6193a0With only
core/test/inbox-readonly.test.jsadded to the clean base tree: 6 tests / 2 pass / 4 fail. The four reds are the writes and the hint; the two greens are the reverses that must not move.inbox-readonly.test.js:111— result card: expected["Open"], actual["Send back","Accept","Open"]inbox-readonly.test.js:115— question card: expected["Open"], actual["A","B","Submit","Open"]inbox-readonly.test.js:121— task input: expected["Open"], actual["Submit","Open"]inbox-readonly.test.js:127— dialog: expected 1bt-read-onlyrole="status"line carrying the lock text, actual0["Reject","Allow once","Always allow for this Bot","Always allow for this group","Open"]; a writable window keeps["Send back","Accept","Open"],["A","B","Submit","Open"],["Submit","Open"]and its recorded tree sha256b19823e6ca04389a3325e312aaf4807b84b55b882a255c3546d15c9c8ec23d41/ 3088 bytes.After the fix the file is 6/6/0.
Gates at this tip
node core/scripts/build-client.mjs --check— silent, exit 0node scripts/ds-bot-patches.mjs generatetwice; the second pass writes nothing (sha256 of everypatches/ds-bot/**file pluscore/client.jsidentical before and after)node scripts/ds-bot-patches.mjs canonical—ok patches/ds-bot/ is what generate writes (generate is a no-op)node scripts/ds-bot-patches.mjs check— threeoklines (ds-bot/= the pin; 10 patches apply cleanly in order;core/equalsds-bot/+patches/ds-bot/)TZ=UTC ARCH_DOCS_BASE=5d6193a06b8a4cae2b650b1ee6d7d0cd6baf4dcb npm run verify— exit 0, 8 suites, 4664 tests / 4664 pass / 0 fail: core 2715 (clean base 2709 + the 6 new cases), social 570, tree 132, timeline 140, workflow 411,.github/scripts633, interop 37, live-e2e 26; lint 74/36/9/2/16/0 warnings, 0 errors in every package;arch-docs: OK (8 changed file(s))Not run: the smoke test (this changes no
core/index.jsorcore/src/host/file), and the CIpackagejob's own extras (pack check, typecheck, actionlint) whichverifydoes not include.Checkpoint
{ "pr": 2299, "claim": "Dev1", "issue": 2284, "summary": "A read-only window's Inbox drew the whole Needs-you action set, and the host refuses every one of those writes with bot/read-only. The four writes (answer a question, the task input, Accept, Send back) are no longer drawn when the window is locked, and the dialog carries the same bt-read-only hint the Settings header and boards draw. Rows and Open stay, and an Approval keeps Reject and Allow because approval-answer is one of the reads a read-only channel allows. A writable window draws exactly the tree it drew before, pinned by a fixture sha256.", "files": [ "core/src/client/inbox.js", "core/test/inbox-readonly.test.js", "docs/subsystems/core-client.md" ], "checks": { "ran": "TZ=UTC ARCH_DOCS_BASE=5d6193a0 npm run verify; node core/scripts/build-client.mjs --check; node scripts/ds-bot-patches.mjs check; CI at this tip: tests-ok, Node 24, plugins, package, merge-gate", "result": "green", "at": "8dbfc9dee7b9c33e9d4f5247b951e2f228c9891e" }, "next": "none — T1, PASS at this tip, green tests-ok; enqueue through the merge queue" }